<%--
  Created by IntelliJ IDEA.
  User: zjk
  Date: 2018-08-03
  Time: 21:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>销售计划表</title>
    <link rel="shortcut icon" href="easyui/css/images/favicon.ico"/>
    <link rel="stylesheet" href="css/flipclock.css">
    <link href="css/CalcSS3.css" rel="stylesheet" type="text/css"/>
    <link href="css/index.css" rel="stylesheet" type="text/css"/>
    <link href="easyui/css/easyui.css" rel="stylesheet" type="text/css">
    <link href="easyui/css/easyui_animation.css" rel="stylesheet" type="text/css">
    <link href="easyui/css/easyui_plus.css" rel="stylesheet" type="text/css">
    <link href="easyui/css/insdep_theme_default.css" rel="stylesheet" type="text/css">
    <link href="easyui/css/icon.css" rel="stylesheet" type="text/css">
    <link href="easyui/css/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">


    <!-- 引入 ECharts 文件 -->
    <script src="js/echarts.js"></script>
    <!--放入自定义的图表-->
    <script src="js/monitor.js"></script>
    <script type="text/javascript" src="easyui/js/jquery.min.js"></script>
    <script type="text/javascript" src="easyui/js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="easyui/js/jquery.insdep-extend.min.js"></script>
    <script type="text/javascript" src="js/utils/DateFormate.js"></script>



</head>
<body>
<style>
    .by{
        padding: 10px;
        text-align: center;
    }
</style>
<!--引入销售计划JS-->
<script type="text/javascript" src="js/before-sale/salePlan.js"></script>
<!-- 引入公用表格和表单样式 -->
<link href="css/utils/utilsDatagrid.css" rel="stylesheet" type="text/css">
<link href="css/utils/utilsForm.css" rel="stylesheet" type="text/css">
<!-- 引入 详情样式-->
<link href="css/utils/utilsDetails.css" rel="stylesheet" type="text/css">


<div class="easyui-layout"  data-options="fit:true, border:false">
    <div data-options="region:'north', border:false,height:300" style="padding:5px;">
        <table id="zjk-salePlan-dg" class="easyui-datagrid table-chance"  data-options="fit:true,striped:true,fitColumns:true,singleSelect:true,
   autoRowHeight:true,nowrap:false,pagination:true,toolbar:'#zjk-salePlan-tools',scrollbarSize:0,
pageList:[5,10,15,20],pageSize:5,
url:'find-all-salePlan',method:'post'">
            <thead>
            <tr class="datagrid-header-row">
                <th data-options="field:'planId',width:10,align:'center',checkbox:true"></th>
                <th data-options="field:'planName',width:100,align:'center'">计划名称</th>
                <th data-options="field:'userId',width:60,align:'center',formatter:function(value){
							var result;
							$.ajax({
								url:'client-get-userName',
								async:false,//改为同步请求
								type:'POST',
								data:{uId:value},
								success:function(e){
									result = e;
								}
							});
							return result;
						}">负责人</th>
                <th data-options="field:'strategyProduct',width:100,align:'center'">产品策略</th>
                <th data-options="field:'strategyPrice',width:100,align:'center'">价格策略</th>
                <th data-options="field:'expenseBudget',width:60,align:'center'" formatter='formatM'>费用预算</th>
                <th data-options="field:'planCheck',width:80,align:'center'">审核状态</th>
                <th data-options="field:'setTime',width:60,align:'center'">创建时间</th>
                <th data-options="field:'updateDate',width:50,align:'center'">更新时间</th>
                <th data-options="field:'operation',width:60,align:'center'" formatter="format">操作</th>



            </tr>
            </thead>

        </table>

    </div>

    <div data-options="region:'center',title:'计划明细', border:false,iconCls:'icon-save2'" style="padding:5px;">
        <table id="zjk-salePlan-edtalis-dg" class="easyui-datagrid table-chance"  data-options="fit:true,striped:true,fitColumns:true,scrollbarSize:0,
   autoRowHeight:true,nowrap:false,pagination:true,
pageList:[5,10,15,20],pageSize:5">
            <thead>
            <tr class="datagrid-header-row">
                <th data-options="field:'pId',width:50,align:'center',formatter: function (value, row, index) {
                                                                return row.productionDetail.pid;}">产品编号</th>
                <th data-options="field:'pname',width:100,align:'center',formatter: function (value, row, index) {
                                                                return row.productionDetail.pname;}">产品名称</th>
                <th data-options="field:'pwunit',width:30,align:'center',formatter: function (value, row, index) {
                                                                return row.productionDetail.pwunit;}">单位</th>
                <th data-options="field:'poprice',width:60,align:'center',formatter: function (value, row, index) {
                                                                return row.productionDetail.poprice;}">售价</th>
                <th data-options="field:'expectGain',width:70,align:'center',formatter: function (value, row, index) {
                                                                return row.planDetail.expectGain;}">目标销量</th>
                <th data-options="field:'planMoney',width:50,align:'center',formatter: function (value, row, index) {
                                                                return row.productionDetail.poprice * row.planDetail.expectGain;}">目标销售额</th>
                <th data-options="field:'cname',width:60,align:'center'">客户</th>
                <th data-options="field:'uname',width:60,align:'center'">销售代表</th>
                <th data-options="field:'planTime',width:90,align:'center',formatter: function (value, row, index) {
                                                                return row.planDetail.planTime;}" >计划时间</th>

            </tr>
            </thead>
            <tbody>

            </tbody>
        </table>

    </div>
    </div>
</div>
<!--主表工具栏-->
<div id="zjk-salePlan-tools">
    <a id="zjk-add-salePlan-btn"  class="easyui-linkbutton"data-options="iconCls:'icon-mini_add2',plain:true">新建</a>
    <a id="delete-salePlan" href="#" class="easyui-linkbutton"data-options="iconCls:'icon-my_delete',plain:true">删除</a>


    <a id="zjk-search-all-salePlan-btn" class="easyui-linkbutton" data-options="iconCls:'icon-my_search',plain:true">查询所有</a>

    <input id="zjk-salePlan-search" class="easyui-searchbox" style="width: 250px" data-options="menu:'#salePlan-mm'"/>
    <!--搜索框菜单-->
    <div id="salePlan-mm" style="width:120px">
        <div data-options="name:'planName'">项目名称</div>
        <div data-options="name:'planCheck'">审核状态</div>
        <%--<a id="advance-search-btn" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-my_search'">高级查询</a>--%>
    </div>
</div>
<%--//新建窗口--%>
<div id="zjk-salePlan-add-dialog" class="easyui-dialog" style="background-color:#EBEFF2;" data-options="
           title:'新建销售计划',
           modal:true,
			iconCls:'icon-save2',
			width:'46%',
			height:'53%',
			closed:true,
			href:'zjk-salePlan-form',
			shadow:true,
			bodyCls:'by',
			buttons:'#zjk-salePlan-add-dialog-bb' "></div>
<%--//添加明细窗口--%>
<div id="zjk-salePlan-add-plan-Details" class="easyui-dialog" style="background-color:#EBEFF2;" data-options="
           title:'销售计划视图',
           modal:true,
			iconCls:'icon-save2',
			width:'70%',
			height:'100%',
			closed:true,
			href:'add-and-edit-planDetails',
			shadow:true,
			bodyCls:'by',
			buttons:'#zjk-salePlan-add-planDetails-bb' "></div>
<%--//编辑窗口--%>
<div id="zjk-edit-salePlan-and-planDetails" class="easyui-dialog" style="background-color:#EBEFF2;" data-options="
           title:'修改销售计划',
           modal:true,
			iconCls:'icon-save2',
			width:'70%',
			height:'100%',
			closed:true,
			href:'salePlan-and-planDetails-edit-form',
			shadow:true,
			bodyCls:'by',
			buttons:'#zjk-edit-salePlan-and-planDetails-bb' "></div>
<%--//新建窗口按钮--%>
<div id="zjk-salePlan-add-dialog-bb">
    <a href="#" id="zjk-salePlan-add-and-edit-bb-go" class="easyui-linkbutton" data-options="iconCls:'icon-edit2'">编辑明细</a>
    <a href="#" id="zjk-salePlan-add-dialog-bb-save" class="easyui-linkbutton" data-options="iconCls:'icon-ok2'">保存</a>
    <a href="#" id="zjk-salePlan-add-dialog-bb-close" class="easyui-linkbutton" data-options="iconCls:'icon-cancel2'">关闭</a>
</div>
<%--//添加明细窗口按钮--%>
<div id="zjk-salePlan-add-planDetails-bb">
    <a href="#" id="zjk-salePlan-add-planDetails-bb-save" class="easyui-linkbutton" data-options="iconCls:'icon-ok2'">保存</a>
    <a href="#" id="zjk-salePlan-add-planDetails-bb-close" class="easyui-linkbutton" data-options="iconCls:'icon-cancel2'">关闭</a>
</div>
<%--//编辑窗口按钮--%>
<div id="zjk-edit-salePlan-and-planDetails-bb">
    <a href="#" id="zjk-edit-salePlan-and-planDetails-bb-save" class="easyui-linkbutton" data-options="iconCls:'icon-ok2'">保存</a>
    <a href="#" id="zjk-edit-salePlan-and-planDetails-bb-close" class="easyui-linkbutton" data-options="iconCls:'icon-cancel2'">关闭</a>
</div>




</body>
</html>
